package com.kele.constants;

/**
 * modbus 功能码
 */
public abstract class ModbusFunction {

    /**
     * 01 读取离散输入
     */
    public static final int READ_COILS = 0x01;
    /**
     * 02 读取输入寄存器
     */
    public static final int READ_DISCRETE_INPUTS = 0x02;
    /**
     * 03 读取保持寄存器
     */
    public static final int READ_HOLDING_REGISTERS = 0x03;
    /**
     * 04 (与02相同，不常用)
     */
    public static final int READ_INPUT_REGISTERS = 0x04;
    /**
     * 05 单个线圈写入
     */
    public static final int WRITE_SINGLE_COIL = 0x05;
    /**
     * 06 单个寄存器
     */
    public static final int WRITE_SINGLE_REGISTER = 0x06;
    /**
     * 15 多个线圈写入
     */
    public static final int WRITE_MULTIPLE_COILS = 0x0F;
    /**
     * 16 多个寄存器写入
     */
    public static final int WRITE_MULTIPLE_REGISTERS = 0x10;
}
